<template>
  <view>
    <Navbar :hideBtn="false" title="工作台" :h5Show="false" bgColor="#2474fa" :titleStyle="titleStyle" 
			:border="false" :onpageshow="true" :fixed="true" @handleAdd="handleAdd" ></Navbar>
    <view class="mobile-item-container">
      <view style="font-size: 40rpx; font-weight: bold; padding: 0 0 40rpx 0;">我的客户</view>
      <u-grid col="3">
        <u-grid-item @click="navigateTo('/pages/crm/inTransitList')">
          <view style="position: relative;">
            <image src="@/static/img/zt.png" style="width: 100rpx; height: 100rpx;" mode="scaleToFill"></image>
          </view>
          <text class="btn-text">在途客户</text>
        </u-grid-item>
        <u-grid-item @click="navigateTo('/pages/crm/redistributionList')">
          <view style="position: relative;">
            <image src="@/static/img/zfp.png" style="width: 100rpx; height: 100rpx;" mode="scaleToFill"></image>
            <!-- <u-badge style="position: absolute; top: -5rpx; right: -10rpx;" type="error" numberType="overflow" max="99" v-model="todo.task"></u-badge> -->
          </view>
          <text class="btn-text">再分配客户</text>
        </u-grid-item>
        <u-grid-item @click="navigateTo('/pages/crm/teamList')">
          <view style="position: relative;">
            <image src="@/static/img/td.png" style="width: 100rpx; height: 100rpx;" mode="scaleToFill"></image>
            <!-- <u-badge style="position: absolute; top: -5rpx; right: -10rpx;" type="error" numberType="overflow" max="99" v-model="todo.error"></u-badge> -->
          </view>
          <text class="btn-text">团队客户</text>
        </u-grid-item>
      </u-grid>
    </view>
    <Gap />
    <view class="mobile-item-container">
      <view style="font-size: 40rpx; font-weight: bold; padding: 0 0 40rpx 0;">数据库搜索</view>
      <u-grid col="3">
        <u-grid-item @click="navigateTo('/pages/crm/returnList')">
          <image src="@/static/img/hl.png" style="width: 100rpx; height: 100rpx;" mode="scaleToFill"></image>
          <text class="btn-text">回流客户</text>
        </u-grid-item>
      </u-grid>
    </view>
    <Gap />

  </view>
</template>

<script>
import Navbar from '@/components/navbar/Navbar'
import Gap from '@/components/gap/Gap'

export default {
  components: {
    Gap,
    Navbar,
  },
  data() {
    return {
      titleStyle: {
				color: '#fff'
			},
      activeKey: 'work',
      tabs: [{
        name: '日常工作',
        key: 'work'
      }, {
        name: '插件',
        key: 'plugin'
      }],
      todo: {
        notice: 2,
        task: 5,
        error: 1
      }
    }
  },
  methods: {
    tabChange(item) {
      this.activeKey = item.key;
    },
    navigateTo(url) {
      uni.navigateTo({ url: url })
    },
    handleAdd() {
			uni.navigateTo({
				url: '/pages/form/customerAddOrEditForm'
			})


		},
  }
}
</script>

<style lang="scss"></style>